package com.example.tool.mvp;

import com.example.tool.dao.entity.HealthIndexDomain;
import com.example.tool.mvp.base.BasePresenter;
import com.example.tool.util.DataRequest;

import java.util.ArrayList;
import java.util.List;

/**
 * Created Date 2019/8/25.
 *
 * @author liangkun
 * ClassDescription：基础交互类
 */
public class CommonPresent extends BasePresenter<CommonContract.Moudle, CommonContract.View> {
    @Override
    protected CommonContract.Moudle createModule() {
        return null;
    }

    /**
     * @param
     * @return
     * @description 模拟数据
     * @author liangkun
     * @time 2019/10/8 17:05
     */
    public List<HealthIndexDomain> getIndexData() {
        List<HealthIndexDomain> list = new ArrayList<>();
        for (int i = 0; i < 30; i++) {
            HealthIndexDomain domain = new HealthIndexDomain();
            domain.setBody(DataRequest.getRandom(349));
            domain.setSleep(DataRequest.getRandom(299));
            domain.setSport(DataRequest.getRandom(449));
            domain.setScore(DataRequest.getRandom(1009));
            list.add(domain);
        }
        return list;
    }


}
